package com.zuipin.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zuipin.entity.product.Product;
import com.zuipin.mapper.ProductMapper;
import com.zuipin.service.IProductService;
import com.zuipin.util.Pagination;

/**
 * 商品服务实现
 * 
 * @ClassName: ProductSer5viceImpl
 * @Description: TODO
 * @author joy.zhang
 * @date 2017年3月27日 上午10:50:43
 */
@Service
public class ProductServiceImpl implements IProductService {
	
	@Resource
	private ProductMapper productMapper;
	
	@Override
	public Product findById(Long id) {
		
		return productMapper.findById(id);
	}
	
	@Override
	public void insert(Product pro) {
		productMapper.insert(pro);
		
	}
	
	@Override
	public void update(Product pro) {
		productMapper.update(pro);
	}
	
	@Override
	public void delete(Long id) {
		productMapper.delete(id);
		
	}
	
	@Override
	public List<Product> seachProduct(Product pro, Pagination page) {
		return productMapper.seachProduct(pro, page);
	}
	
}
